package io.mft.commons.ioc;

import java.util.HashMap;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;

/**
 * 
 * @类型名称：SpringRegistry
 * @说明：TODO
 * @创建者: 胡常建
 * @创建时间: 2018年3月7日 下午11:54:33
 * @修改者: 胡常建
 * @修改时间: 2018年3月7日 下午11:54:33
 */
public class MFTSpringRegistry{
	Logger logger=LoggerFactory.getLogger(MFTSpringRegistry.class);
	static final HashMap<String, ApiBeanName> apiIdCache=new HashMap<String, ApiBeanName>();
	public static void resetInit() {
		apiIdCache.clear();
	}
	private String basePackage;
	private String sysNo;
	public MFTSpringRegistry(String sysNo,String basePackage) {
		this.basePackage=basePackage;
		this.sysNo=sysNo;
	}
	public static HashMap<String, ApiBeanName> getApiIdCache() {
		return apiIdCache;
	}
	
	
	public void reg(BeanDefinitionRegistry registry){
		try {
			//MapperSpringRegistry mapperSpringRegistry=new MapperSpringRegistry(sysNo, basePackage,apiIdCache);
			//mapperSpringRegistry.reg(registry);
			//ServiceSpringRegistry serviceSpringRegistry=new ServiceSpringRegistry(sysNo, basePackage, apiIdCache);
			//serviceSpringRegistry.reg(registry);
			//FunctionSpringRegistry functionSpringRegistry=new FunctionSpringRegistry(sysNo, basePackage, apiIdCache);
			//functionSpringRegistry.reg(registry);
		} catch (Exception e) {
			logger.error("", e);
		}

	}
}
